const { watch: w } = require('gulp');
const { globs } = require('./common');


const watchOptions = { events: ['add', 'change', `unlink`] };

const watch = ({ scss, js, json, wxml }) => {
    w(globs.js, watchOptions, js);
    w(globs.scss, watchOptions, scss);
    w(globs.json, watchOptions, json)
    w(globs.wxml, watchOptions, wxml)
}

module.exports = watch;